From 3c9c43d957163e6d39dc6527a3083468627dde74 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Jun 1993 20:29:41 +0000 Subject: [PATCH] (vc-find-file-hook): Check buffer-file-name is non-nil. --- lisp/vc-hooks.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 18f9bfb0c8d..83588dcb4fe 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -137,7 +137,8 @@ visiting FILE." (defun vc-find-file-hook () ;; Recompute whether file is version controlled, ;; if user has killed the buffer and revisited. - (vc-file-setprop buffer-file-name 'vc-backend nil) + (if buffer-file-name + (vc-file-setprop buffer-file-name 'vc-backend nil)) (if (and (vc-mode-line buffer-file-name) (not vc-make-backup-files)) (progn (make-local-variable 'make-backup-files) -- 2.30.2